<?php

/**
 * Created by IntelliJ IDEA.
 * User: jirapatjantsakool
 * Date: 5/5/14
 * Time: 9:45 AM
 */
class mailutil
{

    public static function sendEmail($name, $to, $telephone, $subject, $message, $headers)
    {

        $msg = 'Name : ' . $name . '\r\n' .
               'Telephone : ' . $telephone . '\r\n' . $message;

        if(@mail($to, $subject, $msg, $headers)) {
            return 'Send email success';
        } else {
            return 'Send email failed';
        }
    }

}


?>